Mixing COP and OOP
نویسندگان
چکیده
We describe and justify thirteen technical properties that a component system must possess to work with object-oriented programming languages (such as Java, C++, or C#). Our components are designed for large-scale, modular construction of programs with static checking of program compositions. Jiazzi, our enhancement of Java, implements the technical properties that we describe. We use Jiazzi components in our examples, but only to make the discussion more concrete. Readers interested in the details of the Jiazzi component system should refer to our technical paper in OOPSLA '01 [8]. P1. Language support: Components should be described with a specific language construct. P2. Core language integration: Components should contain, import and export instances of constructs in the core language. As object-oriented software systems increase in size and complexity , components are becoming central to the design process, and they deserve language support. Otherwise, the lack of an explicit language construct for components places a substantial burden on programmers who implement components, and it obscures the pro-grammer's intent to the compiler and other programmers. Furthermore, components should be integrated with the core language , as opposed to working around the language with various compositional design patterns [6]. In class-based languages, the primary core language construct is the class, and large-scale elements of reuse are class libraries and frameworks. Jiazzi's units [5] are explicit language constructs that describe components. There are two types of units: atoms, which are built from Java classes, and compounds, which are built from other units. Both atoms and compounds import and export Java classes. P3. Coarse-grained connections: Connections between imports and exports should be able to connect many classes at once. Connections between components should be coarse-grained, because components represent large-scale software entities. Components should import, export, and connect together groups of classes, since management of individual imported and exported classes does not scale with larger designs. In Jiazzi, groups of classes are imported together, exported together, and connected together when units are linked; we call these groups of classes packages to emphasize their similarity to packages in standard Java. P4. Hierarchical composition: A component should be com-posable into a larger, encapsulated component. P5. Component instantiation: A component should be instantiated for each use. P6. External linking: A component's external class dependencies should be resolved by the user of the component. Composition of components to form larger, compound components enables the incremental construction of software. Outside a compound component, …
منابع مشابه
Comparative Evaluation of Programming Paradigms: Separation of Concerns with Object-, Aspect-, and Context-Oriented Programming
There are many programming paradigms for the separation of concerns (SoC). Each paradigm modularizes concerns in a different way. Context-oriented programming (COP) has been developed as a supplement to objectoriented programming (OOP), which is one of the most widely used paradigms for SoC. It modularizes concerns that are difficult for OOP. In this paper, we focus on three paradigms OOP, aspe...
متن کاملContext - Oriented Programming
Context-oriented programming (COP) introduces one more notion to reason about the structure of software systems: a context (an environment) is a set of entities bound with a system of relations. This view is applicable where the object-oriented one is inadequate. Implementation of COP requires the same techniques as OOP: COP and OOP are different things assembled from the same components. COP a...
متن کاملResearch on an MDA Based COP Approach 1
Object-Oriented Programming (OOP) has some weaknesses in that it does not always produce reusable software and is not suitable for a large project and does not support the complete encapsulation of classes due to the inheritance of subclasses. As an evolutionary method of OOP, Component-Oriented Programming (COP) or Component-Based Development (CBD) has recently been hot issues for the Software...
متن کاملبررسی عددی عملکرد سیستم تبرید با اجکتور دومرحلهای
In this paper, the performance of arefrigeration cycle with double stage ejector is studied. Also the effect of some working fluids, the ejector geometry including the diameter change in the part of constant diameter at the first and second stages and operating parameters on the entrainment ratio of the first and second stages in the ejector and coefficient of performance cycle (COP) are studied....
متن کاملConcepts and Concept-Oriented Programming
In the paper we introduce a new programming language construct, called concept, which is defined as a pair of two classes: one reference class and one object class. Instances of the reference class are passed-by-value and are intended to indirectly represent objects. Instances of the object class are passed-by-reference. Each concept has a parent concept specified by means of the concept inclus...
متن کاملConcept-oriented programming: from classes to concepts and from inheritance to inclusion
For the past several decades, programmers have been modeling things in the world with trees using hierarchies of classes and object-oriented programming (OOP) languages. In this paper, we describe a novel approach to programming, called conceptoriented programming (COP), which generalizes classes and inheritance by introducing concepts and inclusion, respectively.
متن کامل